package com.itheima.pojo;


<<<<<<< HEAD
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.itheima.anno.State;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.groups.Default;
import lombok.Data;
import net.bytebuddy.implementation.bind.annotation.Empty;
import org.hibernate.validator.constraints.URL;
=======
import lombok.Data;
>>>>>>> 08ea7c3a718b4abad24581cc274164043dc145f5

import java.time.LocalDateTime;

@Data
public class Article {
    private Integer id;//主键ID
<<<<<<< HEAD
    @NotEmpty(groups = add.class)
    @Pattern(regexp = "^\\S{1,10}$", groups = add.class)
    private String title;//文章标题
    @NotEmpty(groups = add.class)
    private String content;//文章内容
    @URL
    private String coverImg;//封面图像
    @State     //自定义注解
    private String state;//发布状态 已发布|草稿
    @NotNull(groups = add.class)
    private Integer categoryId;//文章分类id
    @JsonIgnore
    private Integer createUser;//创建人ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;//更新时间

    public interface add extends Default{

    }
=======
    private String title;//文章标题
    private String content;//文章内容
    private String coverImg;//封面图像
    private String state;//发布状态 已发布|草稿
    private Integer categoryId;//文章分类id
    private Integer createUser;//创建人ID
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
>>>>>>> 08ea7c3a718b4abad24581cc274164043dc145f5
}
